package vns.client.event;

import vns.shared.RuleSetDTO;

import com.google.gwt.event.shared.GwtEvent;

public class RuleSetEditEvent extends GwtEvent<RuleSetEditEventHandler> {

	public static Type<RuleSetEditEventHandler> TYPE = new Type<RuleSetEditEventHandler>();
	private RuleSetDTO ruleSetDTO = null;
	
	public RuleSetEditEvent(RuleSetDTO ruleSetDTO){
		this.setRuleSetDTO(ruleSetDTO);
	}
	
	@Override
	public Type<RuleSetEditEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(RuleSetEditEventHandler handler) {
		handler.onLoad(this);
	}

	public void setRuleSetDTO(RuleSetDTO ruleSetDTO) {
		this.ruleSetDTO = ruleSetDTO;
	}

	public RuleSetDTO getRuleSetDTO() {
		return ruleSetDTO;
	}

}
